package com.asking.dao;

import com.asking.domain.History;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface RecommendMapper  extends Mapper<History> {

    @Select("SELECT  *  FROM    (SELECT  *   FROM  history  \n" +
            "WHERE   uid=#{uid}   \n" +
            "ORDER  BY  cid) h\n" +
            "WHERE   h.cid=#{cid}\n" +
            "ORDER BY history_time DESC")
    public List< History>   historyCategory(@Param("uid")Integer uid,@Param("cid")Integer  cid);
}
